<?php

class Admin_Form_Pointgmv extends Zend_Form
{
    public function __construct($options = null)
    {
        parent::__construct($options);
        $this->setName('espece');

        //$idespece = new Zend_Form_Element_Hidden('idespece');

        $latitude = new Zend_Form_Element_Text('latitude');
        $latitude->setLabel('Latitude')
        ->setRequired(true)
        ->addFilter('StripTags')
        ->addFilter('StringTrim')
        ->addValidator('NotEmpty');
        
        $longitude = new Zend_Form_Element_Text('longitude');
        $longitude->setLabel('Longitude')
        ->setRequired(true)
        ->addFilter('StripTags')
        ->addFilter('StringTrim')
        ->addValidator('NotEmpty');
        
       $pointgmvprec = new Zend_Form_Element_Select('pointgmvprec');
		$pointgmvprec->setLabel('Point precedent')
         ->setRequired(true)
         ->addFilter('StripTags')
         ->addFilter('StringTrim')
         ->addValidator('NotEmpty');
 
		$table = new Admin_Model_DbTable_Pointgmv();
		foreach ($table->fetchAll() as $c) {
	    	$pointgmvprec->addMultiOption($c->idpointgmv, $c->latitude.'--'.$c->longitude);
			}

        

        
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'submitbutton');
        
    
        $this->addElements(array($latitude,$longitude,$pointgmvprec,$submit));
    }
    
    
    
   
}